package com.example.onetomanydemo.mapper;/*
 **
 * @author yangyang
 *@date 2022/06/29 21:48
 **/

import com.example.onetomanydemo.bean.Company;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface CompanyMapper {
    /*
     * 根据公司id查询公司信息
     */

   @Select("SELECT * FROM company WHERE id = #{id}")
   @Results({
           @Result(property = "companyName",column = "name")
   })
   Company getCompanyById(Long id);

}
